public class Student {
    private String name;
    private int age;
    private String sex;
    private static int classRoom = 113;

    //初始化静态成员用的
    static {
        Student.classRoom = 110;
        //静态代码块中不能出现非静态的东西
//        name = "lisi"
    }

    public Student() {

    }

    {
        System.out.println("hello java");
    }

    public Student(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
//        每次创建对象的时候就会进行调用
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public static int getClassRoom() {
        return classRoom;
    }

    public static void setClassRoom(int classRoom) {
        Student.classRoom = classRoom;
    }

    public static void look(){
        System.out.println("look");
//        show();
    }

    public void show() {
        System.out.println("hello java");
        look();
    }

    @Override
    public String toString() {
        return "zjy";
    }
}
